{% extends "base.html" %}
{% block page_content %}
<script type="text/javascript" src="{{ url_for('static', filename='js/tables.js') }}"></script>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-2 column">
            <div class="page [secondary] with-sidebar">
                <div class="page-sidebar">
                    <div class="btn-group-vertical" role="group" aria-label="...">
                        {% if tables %}
                        {% for table in tables %}
                                <button id="bt_table_{{table.name}}" type="button"
                                        class="btn btn-default btn-block btn-sm">{{ table.label }}
                                    <br/>
                                    <small>{{ table.name }}</small>
                                </button>
                        {% endfor %}
                        {%endif%}
                    </div>
                </div>
            </div>
        </div>
        <div id="table_container" class="col-md-7 column">

        </div>
        <div class="col-md-2 column">
            <label>执行sql</label>
            <textarea id="txt_sql" class="form-control" rows="3" placeholder="输入sql语句">{{executed_sql or ''}}</textarea>
            <br/>
            <button id="bt_execute" type="button" class="btn btn-xs btn-info btn-block">Execute</button>
        </div>
    </div>
</div>


{% endblock %}
